#include <myheader.h>

/*Usage:  */
int main(int argc, char *argv[])
{
    int numsSize = 10;
    int nums[10] = {0};
    for(int i = 0; i < 10; i++){
        scanf("%d",&nums[i]);
    }
    
    for(int j = 0; j < 10; j++){
        printf("%d ",nums[j]);
    }
    int head_pointer = 0;
    int pointer = 1;
    for (int i = 0; i < numsSize; i++) {
        while (nums[pointer] == nums[head_pointer]) {
            // 说明有重复，进行删除操作
            for (int j = pointer; j < numsSize - 1; j++) {
                nums[j] = nums[j + 1];
            }
            numsSize--;
            pointer++;
        }
        // 结束循环说明没有重复数字，或者重复数字删除完，
        // 重置pointer
        head_pointer = pointer;
        pointer = head_pointer + 1;
    }
    printf("\n");
    for(int i = 0; i < numsSize; i++){
        printf("%d ",nums[i]);
    }
    return 0;
}

